package FactoryPattern.SimpleFactory;

/**
 * 把产品的创建放在一个具体的类中
 *
 */
public class ComputerFactory {
	
	public static Computer createComputer(String flag){
		if(flag.equals("dell")){
			return new Dell();
		}else if(flag.equals("lenovo")){
			return new Lenovo();
		}
		return null;
	}
}
